#ifndef USERSTATELIST_H
#define USERSTATELIST_H

#include "userStates.h"

#include "DataState.h"

#include "StateTitle.h"
#include "StateMain.h"
#include "StateLevelSelect.h"
#include "StateIntroduction.h"
#include "StateScore.h"
#include "StateGameover.h"

/// Include the header file of your game state here: ///
#include "StateExample.h"
#include "StateFactory.h"

/// Add a case for your state to the switch statement (copy and edit an existing one)
/// This function creates the state object
BaseState* createUserState(const uint& ident)
{
    GameBaseState* state;

    switch (ident)
    {
        ///
    case STATE_EXAMPLE:
    {
        state = new StateExample;                   // Constructor call
        state->stateID = STATE_EXAMPLE;             // The id of your level (used to determine which game is next in the list), just use the STATE_MODES one
        break;
    }
    case STATE_FACTORY:
    {
        state = new StateFactory;
        state->stateID = STATE_FACTORY;
        break;
    }
    default:
        state = NULL;
    }

    return state;
}

/// Add a case for your state to the switch statement (copy and edit an existing one)
/// This function supplies information about a state to the intro and level select screens
DataState* getStateInformation(const uint& ident)
{
    string stateName = "The name of your level";
    string stateDescription = "A short description of the level";
    // A path to an image which will be shown in the background of the intro screen
    string backgroundImage = "";
    // A path to a small icon which will be shown somewhere, maybe
    string iconImage = "";
    // You can pass some settings along with the image path, for example:
    // the number of x and y frames of an animation in a sprite-sheet
    // the transparent colour (red + green * 256 + blue * 256 * 256)
    // the framerate (per second)
    // when passing a lower setting you will also have to supply the ones above (e.g. you cannot just pass the transparent colour)
    // Example: images/someImage.png,4,1,16711935,15

    switch (ident)
    {
        ///
    case STATE_EXAMPLE:
    {
        stateName = "This is just a test";
        stateDescription = "Test di test test 123 asdf\nblabla";
        backgroundImage = "";
        iconImage = "";
        break;
    }
    case STATE_FACTORY:
    {
        stateName = "The board factory";
        stateDescription = "Raid the board factory.\nDestroy the evil spirit of lazyness.";
        backgroundImage = "";
        iconImage = "";
        break;
    }
    default:
        return NULL;
    }

    return new DataState(stateName,stateDescription,backgroundImage,iconImage);
}

#endif	//	USERSTATELIST_H
